const express = require('express');
const bodyParser = require('body-parser');
const fs = require('fs');
const app = express();
const cookieParser = require('cookie-parser');


// 引入template模块 multer 模块
var template = require('./template.js');
var db = require("./db/db.js");
app.use(express.static('www'));
app.set("view engine", "html");
app.engine('.html', template.__express);
app.use(cookieParser());
app.use(bodyParser.urlencoded({ extended: true }));
// 引入并放入app.use
app.use(require("./routers/user.js"))



app.listen(3000, function() {
    console.log('服务器正常起动');
});
